import { request } from "./utils";

export function getUnBookingRoomTypesQuantity(query: QueryParams) {
  return request({
    url: "/hotel/booking/getUnBookingRoomTypesQuantity",
    method: "get",
    params: query
  });
}
export function roomBooking(data: BookingForm) {
  return request({
    url: "/hotel/booking/pre-book",
    method: "post",
    data: data
  });
}
export function getBookingInfo(query: BookingQuery) {
  return request({
    url: "/hotel/booking/getBookingInfo",
    method: "get",
    params: query
  });
}

interface QueryParams {
  startDate: string;
  endDate: string;
}

interface BookingForm {
  roomTypeId: number;
  contact: string;
  phone: string;
  startDate: string;
  leaveDate: string;
}
interface BookingQuery {
  contact: string;
  phone: string;
  startDate: string;
}

export type { QueryParams, BookingForm, BookingQuery };
